" Inspired by http://jeetworks.org/node/146
function! <SID>SendCurrentRangeAsMarkedUpPythonToMaya(insert_results) range
"" get lines
    let [lnum1, col1] = getpos("'<")[1:2]
    let [lnum2, col2] = getpos("'>")[1:2]
    let lines = getline(lnum1, lnum2)
    let text = join(lines, "\\n")
    "let text = substitute(text, '"', '\\\"', "g")

    execute "!python \"\\%MAYA_SCRIPT_PATH_BASE\\%\\MELVIM\\sendToMaya.py\" " . shellescape(text)
endfunction
command! -bang -range SendToMaya :call s:SendCurrentRangeAsMarkedUpPythonToMaya("<bang>")

